import request from '@/utils/request'

// 查询网点摄像头配置列表
export function listConfig(query) {
  return request({
    url: '/equipment/config/list',
    method: 'get',
    params: query
  })
}

// 查询网点摄像头配置详细
export function getConfig(channelId) {
  return request({
    url: '/equipment/config/' + channelId,
    method: 'get'
  })
}

// 新增网点摄像头配置
export function addConfig(data) {
  return request({
    url: '/equipment/config',
    method: 'post',
    data: data
  })
}

// 修改网点摄像头配置
export function updateConfig(data) {
  return request({
    url: '/equipment/config',
    method: 'put',
    data: data
  })
}

// 删除网点摄像头配置
export function delConfig(equipmentId) {
  return request({
    url: '/equipment/config/' + equipmentId,
    method: 'delete'
  })
}



//批量文件导入
export function importConfig(data) {
  return request({
    url: '/equipment/config/import',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}

// 删除通道配置
export function delConfigChannel(channelId) {
  return request({
    url: '/channel/config/' + channelId,
    method: 'delete'
  })
}


// 修改通道配置
export function updateConfigChannel(data) {
  return request({
    url: '/channel/config',
    method: 'put',
    data: data
  })
}
